<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>后盾人</title>
  </head>
  <body></body>
  <script>
    function factorial(num) {
      return num == 1 ? 1 : num * factorial(--num);
      // if (num == 1) {
      //   return 1;
      // }
      // return num * factorial(num - 1);
      // return 3* 2* 1;
      // return 2* 1;
      // return 1;
    }
    console.log(factorial(5));
  </script>
</html>
